package org.ljy.springblog.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.ljy.springblog.model.UserInfo;

@Mapper
public interface UserInfoMapper {

    //1.根据用户名，查询用户信息
    @Select("select id,user_name,password,github_url from `user` where user_name=#{userName} and delete_flag=0")
    UserInfo selectByName(String userName);

    //2.根据用户id，查询用户信息
    @Select("select id,user_name,github_url from `user` where id=#{id} and delete_flag=0 ")
    UserInfo selectById(Integer id);
}
